<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>旅游网-注册</title>
<link href="css/reg.4a3d726a.css"
          rel="stylesheet" type="text/css">

    
    <link href="css/header_public.css"
          rel="stylesheet" type="text/css"/>
</head>
<script type="text/javascript" src="js/jquery-1.11.0.min.js"></script>
<script type="text/javascript">

function doSubmit(){
	var phone=$("#phone").val();
	var password=$("#password").val();
	$.ajax({
	    url:'doReg',
	    type:'POST', //GET
	    data:{
	        'phone':phone,
	        'password':password
	    },
	    dataType:'json',    //返回的数据格式：json/xml/html/script/jsonp/text
	    success:function(data,textStatus,jqXHR){
	      	//alert(data);  //如果不做处理，弹出的是object，原因就是json是对象
	      	//alert(JSON.stringify(data));//将json对象转换为字符串
	      	if(data.code==1){//检验成功，查无此用户
	      		alert(data.msg);
	      	}else{
	      		alert(data.msg);
	      	}
	    },
	    error:function(xhr,textStatus){
	        alert("对不起，发生错误！");
	    }
	})
	
	
}

</script>
<body>

<div class="reg_logo_hd">
    <h1 class="ctriplogo_reg"><a href="http://www.ctrip.com" title="携程旅行网">携程旅行网</a></h1>
</div>



<div class="cui_bd">
    <div class="reg_wrap hh_reg_wrap">
        <ul class="reg_step">
            <li class="current"><span></span>验证手机</li>
            <li><span></span>设置密码</li>
            <li><span></span>注册成功</li>
        </ul>
        <div class="reg_form reg_form_step1">
            <dl>
                <dt class="label">手机号</dt>
                <dd>
                    <input class="r_input input_country-code_num" type="text" placeholder="有效手机号" id="phone"/>
                </dd>
            </dl>
            <dl>
                <dt class="label">密码</dt>
                <dd>
                    <input class="r_input input_country-code_num" type="text" placeholder="请输入密码" id="password"/>
                </dd>
            </dl>
			<dl class="form_space">
                <dt class="label">&nbsp;</dt>
                <dd><input class="reg_btn" type="button" value="注册" id="regBtn" onclick="doSubmit()"><br>
            </dl>
        </div>
    </div>
</div>
</body>
</html>